Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Manager handles

The principal Progress Dynamics managers, which are called most frequently from other framework code, have their procedure handles defined in an include file called globals.i, located in the src/adm2 director, as shown:

DEFINE NEW GLOBAL SHARED VARIABLE  gshAstraAppserver     AS HANDLE    NO-UNDO.    
/* Handle to Application Server Partition */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshSessionManager     AS HANDLE    NO-UNDO.    
/* Handle to Session Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshSecurityManager    AS HANDLE    NO-UNDO.    
/* Handle to Security Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshProfileManager     AS HANDLE    NO-UNDO.    
/* Handle to Profile Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshRepositoryManager  AS HANDLE    NO-UNDO.    
/* Handle to Repository Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshTranslationManager AS HANDLE    NO-UNDO.    
/* Handle to Translation Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gshGenManager         AS HANDLE    NO-UNDO.    
/* Handle to General Manager */ 
DEFINE NEW GLOBAL SHARED VARIABLE  gscSessionId          AS CHARACTER NO-UNDO.    
/* Unique session EXCLUSIVE-LOCK */ 

Note: This file is in the src/adm2 directory not because it has anything specifically to do with the ADM2 code, which it does not, but simply to place it where many other include files used by SmartObjects are located. In older framework code, there are references to {af/sup2/afglobals.i}, which is equivalent. Note also that the include file contains several other application-specific handles not shown here because they are not relevant for general Progress Dynamics development.

These manager handles, along with the current Session ID and the handle of the default AppServer session, called AstraAppServer, are available from every Progress Dynamics procedure, because globals.i is included in all the standard Progress Dynamics template procedures, and also in src/adm2/smrtprop.i, which makes it part of the SmartObject procedures as well. While you should, in general, avoid global variables in applications, these basic handles are referenced so frequently that they are defined in this way for maximum efficiency. New manager handles should be defined and accessed as properties in the Session Manager, as we discuss in the chapter on building your own manager.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095